package com.etc.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
public class User implements Serializable {
    private int userid;
    private String username;
    private String password;
    private String gender;
    @DateTimeFormat(pattern = "yyyy/MM/dd")
    @JsonFormat(pattern="yyyy/MM/dd HH:mm:ss",timezone = "GMT+8")
    private Date pdate;
    @DateTimeFormat(pattern = "yyyy/MM/dd")
    @JsonFormat(pattern="yyyy/MM/dd HH:mm:ss",timezone = "GMT+8")
    private Date lastdate;
    private String phone;
    private String idcard;
    private double money;
    private String email;
    private Role roleid;
    private String roleone;
    private List<Permission> permissionList;
    private String hospital;

    private Role role;
    private String nameError;
    private String phoneError;
    private String emailError;
    private String passwordError;

}
